package com.heima.controller;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.service.ChannelsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/channel")
public class WmChannelController {

    @Autowired
    private ChannelsService channelsService;

    // 查询所有频道
    @GetMapping("/channels")
    public ResponseResult findChannels(){
        return channelsService.findChannels();
    }
}
